class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.q: B = None
        self.w: F = None
        self.u: E = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: C = None
        self.p: E = None
        self.t: C = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: C = None
        self.p: E = None
        self.t: C = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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