class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: D = None
        self.r: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: B = None
        self.o: D = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: C = None
        self.t: B = None
        self.y: C = None
        self.s: A = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: A = None
        self.t: F = None
        self.txt = txt

e = A("e")
j = B("j")
h = C("h")
c = D("c")
m = E("m")
d = F("d")
i = F("i")

e.q = c
e.y = c
e.r = c
e.x = m
j.t = c
j.x = h
h.w = m
h.s = m
h.u = j
h.q = j
h.o = c
c.r = m
c.o = d
m.u = e
m.s = e
m.w = h
m.y = h
m.t = j
m.q = i
d.u = m
d.z = e
d.t = i
i.u = m
i.z = e
i.t = d
assert c.o.u.q.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: D = None
        self.r: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: B = None
        self.o: D = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: C = None
        self.t: B = None
        self.y: C = None
        self.s: A = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: A = None
        self.t: F = None
        self.txt = txt

e = A("e")
j = B("j")
h = C("h")
c = D("c")
m = E("m")
d = F("d")
i = F("i")

e.q = c
e.y = c
e.r = c
e.x = m
j.t = c
j.x = h
h.w = m
h.s = m
h.u = j
h.q = j
h.o = c
c.r = m
c.o = d
m.u = e
m.s = e
m.w = h
m.y = h
m.t = j
m.q = i
d.u = m
d.z = e
d.t = i
i.u = m
i.z = e
i.t = d
assert c.o.u.q.u.t.txt == "j"