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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.s: A = None
        self.q: E = None
        self.x: F = None
        self.t: E = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

b = A("b")
l = B("l")
n = C("n")
d = D("d")
k = E("k")
e = F("e")
f = G("f")
g = H("g")

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.s: A = None
        self.q: E = None
        self.x: F = None
        self.t: E = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

b = A("b")
l = B("l")
n = C("n")
d = D("d")
k = E("k")
e = F("e")
f = G("f")
g = H("g")

b.t = g
b.x = l
l.x = e
l.o = f
n.p = f
n.w = f
n.y = f
n.r = k
n.q = k
n.t = k
n.s = b
n.x = e
d.u = g
d.r = n
d.v = n
k.w = g
k.o = b
k.v = d
k.t = d
k.u = n
k.x = l
k.s = l
k.q = f
e.u = f
e.y = d
e.p = g
f.v = d
g.s = d
assert b.x.o.v.v.txt == "n"