class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.y: H = None
        self.o: E = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.s: H = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.y: H = None
        self.o: E = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.s: H = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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