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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: A = None
        self.q: F = None
        self.w: D = None
        self.x: B = None
        self.s: C = None
        self.u: B = None
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: A = None
        self.q: F = None
        self.w: D = None
        self.x: B = None
        self.s: C = None
        self.u: B = None
        self.t: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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