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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.v: E = None
        self.t: C = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: A = None
        self.o: A = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

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

g.z = e
g.u = l
g.s = k
b.r = g
b.y = g
b.p = g
b.v = a
b.t = l
l.y = g
h.p = m
h.s = b
h.o = e
a.q = l
m.w = e
m.z = e
m.y = g
m.o = g
m.s = b
k.y = g
c.r = g
c.y = g
c.p = g
c.v = a
c.t = l
e.p = m
e.s = b
e.o = h
assert b.v.q.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: C = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.v: E = None
        self.t: C = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: A = None
        self.o: A = None
        self.z: D = None
        self.s: B = None
        self.txt = txt

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

g.z = e
g.u = l
g.s = k
b.r = g
b.y = g
b.p = g
b.v = a
b.t = l
l.y = g
h.p = m
h.s = b
h.o = e
a.q = l
m.w = e
m.z = e
m.y = g
m.o = g
m.s = b
k.y = g
c.r = g
c.y = g
c.p = g
c.v = a
c.t = l
e.p = m
e.s = b
e.o = h
assert b.v.q.y.s.txt == "k"