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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: D = None
        self.o: A = None
        self.u: A = None
        self.v: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: D = None
        self.o: A = None
        self.u: A = None
        self.v: E = None
        self.y: C = None
        self.txt = txt

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

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