class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: E = None
        self.r: G = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: G = None
        self.txt = txt

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

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