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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.p: B = None
        self.txt = txt

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

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

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