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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.v: F = None
        self.x: H = None
        self.t: G = None
        self.w: D = None
        self.z: C = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: C = None
        self.p: D = None
        self.x: D = None
        self.t: F = None
        self.txt = txt

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

k = A("k")
l = B("l")
g = C("g")
i = D("i")
m = E("m")
b = F("b")
f = G("f")
e = H("e")
c = G("c")

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.v: F = None
        self.x: H = None
        self.t: G = None
        self.w: D = None
        self.z: C = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: C = None
        self.p: D = None
        self.x: D = None
        self.t: F = None
        self.txt = txt

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

k = A("k")
l = B("l")
g = C("g")
i = D("i")
m = E("m")
b = F("b")
f = G("f")
e = H("e")
c = G("c")

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