class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: D = None
        self.x: D = None
        self.s: F = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.s: A = None
        self.q: G = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.v: B = None
        self.txt = txt

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

b = A("b")
e = B("e")
i = C("i")
f = D("f")
d = E("d")
l = F("l")
m = G("m")
n = D("n")
h = F("h")
j = D("j")

b.o = l
e.v = i
e.o = j
e.x = j
e.s = l
e.y = m
i.r = m
f.r = n
f.x = i
f.p = l
f.s = l
f.t = b
f.z = m
d.y = m
d.q = m
d.o = e
d.w = e
d.s = b
l.s = m
l.p = e
l.v = e
m.v = h
m.x = f
m.r = b
n.r = f
n.x = i
n.p = h
n.s = h
n.t = b
n.z = m
h.s = m
h.p = e
h.v = e
j.r = n
j.x = i
j.p = l
j.s = l
j.t = b
j.z = m
assert m.x.x.r.r.o.s.v.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: D = None
        self.x: D = None
        self.s: F = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: B = None
        self.s: A = None
        self.q: G = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.v: B = None
        self.txt = txt

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

b = A("b")
e = B("e")
i = C("i")
f = D("f")
d = E("d")
l = F("l")
m = G("m")
n = D("n")
h = F("h")
j = D("j")

b.o = l
e.v = i
e.o = j
e.x = j
e.s = l
e.y = m
i.r = m
f.r = n
f.x = i
f.p = l
f.s = l
f.t = b
f.z = m
d.y = m
d.q = m
d.o = e
d.w = e
d.s = b
l.s = m
l.p = e
l.v = e
m.v = h
m.x = f
m.r = b
n.r = f
n.x = i
n.p = h
n.s = h
n.t = b
n.z = m
h.s = m
h.p = e
h.v = e
j.r = n
j.x = i
j.p = l
j.s = l
j.t = b
j.z = m
assert m.x.x.r.r.o.s.v.s.v.txt == "h"