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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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