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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: G = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: B = None
        self.t: H = None
        self.u: D = None
        self.s: C = None
        self.o: C = None
        self.y: E = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: G = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: B = None
        self.t: H = None
        self.u: D = None
        self.s: C = None
        self.o: C = None
        self.y: E = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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