class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.o: E = None
        self.p: F = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.v: G = None
        self.u: F = None
        self.y: C = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: F = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.txt = txt

j = A("j")
e = B("e")
i = C("i")
b = D("b")
h = E("h")
m = F("m")
n = G("n")
a = F("a")
c = C("c")

j.r = c
j.q = m
j.p = m
j.o = h
j.s = n
j.y = b
e.t = n
i.s = a
b.w = a
h.r = i
h.w = j
h.v = n
h.u = a
h.x = a
h.y = c
h.o = e
m.y = j
m.r = a
m.z = a
m.o = i
n.o = e
n.t = j
a.y = j
a.r = m
a.z = m
a.o = c
c.s = m
assert h.o.t.o.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.o: E = None
        self.p: F = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.v: G = None
        self.u: F = None
        self.y: C = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: F = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.txt = txt

j = A("j")
e = B("e")
i = C("i")
b = D("b")
h = E("h")
m = F("m")
n = G("n")
a = F("a")
c = C("c")

j.r = c
j.q = m
j.p = m
j.o = h
j.s = n
j.y = b
e.t = n
i.s = a
b.w = a
h.r = i
h.w = j
h.v = n
h.u = a
h.x = a
h.y = c
h.o = e
m.y = j
m.r = a
m.z = a
m.o = i
n.o = e
n.t = j
a.y = j
a.r = m
a.z = m
a.o = c
c.s = m
assert h.o.t.o.t.o.txt == "e"