class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: D = None
        self.q: D = None
        self.r: A = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: E = None
        self.s: A = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: B = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: F = None
        self.w: A = None
        self.v: A = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.w: F = None
        self.p: B = None
        self.q: F = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

h = A("h")
m = B("m")
g = C("g")
n = D("n")
a = E("a")
c = F("c")
i = E("i")
f = A("f")
d = B("d")
l = F("l")

h.t = f
h.r = f
h.u = n
h.q = n
h.x = n
h.w = d
m.q = d
m.o = d
m.v = a
m.r = a
m.s = h
g.u = n
g.p = n
g.s = m
g.q = h
n.s = g
n.t = c
n.z = c
n.w = f
n.v = f
n.r = d
a.v = n
a.y = m
a.p = m
a.w = c
a.q = l
a.o = i
c.r = m
c.u = g
c.y = g
i.v = n
i.y = m
i.p = m
i.w = c
i.q = l
i.o = a
f.t = h
f.r = h
f.u = n
f.q = n
f.x = n
f.w = m
d.q = m
d.o = m
d.v = i
d.r = i
d.s = f
l.r = m
l.u = g
l.y = g
assert a.q.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: D = None
        self.q: D = None
        self.r: A = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: E = None
        self.s: A = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: B = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: F = None
        self.w: A = None
        self.v: A = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.w: F = None
        self.p: B = None
        self.q: F = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

h = A("h")
m = B("m")
g = C("g")
n = D("n")
a = E("a")
c = F("c")
i = E("i")
f = A("f")
d = B("d")
l = F("l")

h.t = f
h.r = f
h.u = n
h.q = n
h.x = n
h.w = d
m.q = d
m.o = d
m.v = a
m.r = a
m.s = h
g.u = n
g.p = n
g.s = m
g.q = h
n.s = g
n.t = c
n.z = c
n.w = f
n.v = f
n.r = d
a.v = n
a.y = m
a.p = m
a.w = c
a.q = l
a.o = i
c.r = m
c.u = g
c.y = g
i.v = n
i.y = m
i.p = m
i.w = c
i.q = l
i.o = a
f.t = h
f.r = h
f.u = n
f.q = n
f.x = n
f.w = m
d.q = m
d.o = m
d.v = i
d.r = i
d.s = f
l.r = m
l.u = g
l.y = g
assert a.q.u.s.txt == "m"