class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: B = None
        self.x: D = None
        self.w: G = None
        self.s: C = None
        self.q: B = None
        self.y: D = None
        self.r: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.o: H = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

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

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

j = A("j")
i = B("i")
d = C("d")
h = D("h")
n = E("n")
b = F("b")
c = G("c")
a = H("a")
k = G("k")
f = E("f")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.o: H = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

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

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

j = A("j")
i = B("i")
d = C("d")
h = D("h")
n = E("n")
b = F("b")
c = G("c")
a = H("a")
k = G("k")
f = E("f")

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