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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: D = None
        self.x: B = None
        self.r: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: D = None
        self.x: B = None
        self.r: D = None
        self.u: D = None
        self.txt = txt

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

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

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