class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: I = None
        self.z: G = None
        self.s: B = None
        self.y: I = None
        self.o: E = None
        self.x: H = None
        self.w: H = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: E = None
        self.t: G = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: B = None
        self.p: B = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: E = None
        self.t: G = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: B = None
        self.p: B = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

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

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