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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: F = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

b = A("b")
d = B("d")
a = C("a")
e = D("e")
f = E("f")
k = F("k")
g = D("g")
h = E("h")
j = F("j")

b.z = k
b.y = d
d.t = e
d.u = k
d.s = b
a.w = g
e.u = b
e.o = b
e.s = a
f.x = e
f.u = a
k.v = f
k.z = b
k.q = h
g.u = b
g.o = b
g.s = a
h.x = e
h.u = a
j.v = h
j.q = h
j.z = b
assert b.z.z.y.t.o.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: F = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

b = A("b")
d = B("d")
a = C("a")
e = D("e")
f = E("f")
k = F("k")
g = D("g")
h = E("h")
j = F("j")

b.z = k
b.y = d
d.t = e
d.u = k
d.s = b
a.w = g
e.u = b
e.o = b
e.s = a
f.x = e
f.u = a
k.v = f
k.z = b
k.q = h
g.u = b
g.o = b
g.s = a
h.x = e
h.u = a
j.v = h
j.q = h
j.z = b
assert b.z.z.y.t.o.z.z.txt == "b"