class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: G = None
        self.p: F = None
        self.u: F = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

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