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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: A = None
        self.z: E = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: A = None
        self.r: D = None
        self.t: F = None
        self.v: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: A = None
        self.z: E = None
        self.t: C = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: A = None
        self.r: D = None
        self.t: F = None
        self.v: F = None
        self.z: A = None
        self.txt = txt

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

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

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