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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: F = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: B = None
        self.w: E = None
        self.v: A = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: F = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: B = None
        self.w: E = None
        self.v: A = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

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

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