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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: D = None
        self.t: A = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: D = None
        self.t: A = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

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

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

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

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