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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: A = None
        self.u: E = None
        self.z: B = None
        self.v: H = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: A = None
        self.u: E = None
        self.z: B = None
        self.v: H = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

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

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

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

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