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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: I = None
        self.x: H = None
        self.s: E = None
        self.t: F = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.q: C = None
        self.t: A = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.w: A = None
        self.q: G = None
        self.y: C = None
        self.t: C = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: G = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: I = None
        self.x: H = None
        self.s: E = None
        self.t: F = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.q: C = None
        self.t: A = None
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.w: A = None
        self.q: G = None
        self.y: C = None
        self.t: C = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

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

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