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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.o: D = None
        self.txt = txt

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

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