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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.q: C = None
        self.z: B = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: C = None
        self.z: E = None
        self.p: C = None
        self.q: B = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.q: C = None
        self.z: B = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: C = None
        self.z: E = None
        self.p: C = None
        self.q: B = None
        self.r: E = None
        self.v: C = None
        self.txt = txt

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

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

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