class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.p: D = None
        self.x: H = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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