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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: C = None
        self.v: B = None
        self.z: G = None
        self.u: G = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.o: B = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: C = None
        self.v: B = None
        self.z: G = None
        self.u: G = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.o: B = None
        self.x: D = None
        self.txt = txt

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

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

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

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