class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: D = None
        self.p: B = None
        self.u: C = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: D = None
        self.p: B = None
        self.u: C = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

i.w = l
i.t = g
k.v = c
k.u = c
k.r = l
k.p = m
k.z = m
k.x = f
c.u = i
c.o = g
c.p = k
c.s = b
l.r = g
g.u = a
f.t = i
f.w = i
f.s = g
f.v = c
m.v = b
m.r = l
m.p = k
m.z = k
m.u = c
m.x = d
d.t = i
d.w = i
d.s = g
d.v = b
a.t = i
a.w = i
a.s = g
a.v = b
b.u = i
b.o = g
b.p = m
b.s = c
assert d.t.t.u.s.txt == "g"