class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: I = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: D = None
        self.p: A = None
        self.o: D = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: D = None
        self.t: A = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

e = A("e")
n = B("n")
h = C("h")
k = D("k")
d = E("d")
m = F("m")
f = G("f")
g = H("g")
l = I("l")
i = B("i")

e.r = m
n.u = f
h.w = d
h.z = d
h.t = l
k.t = m
k.p = e
k.z = f
d.t = n
m.t = g
m.u = g
m.v = k
m.o = k
m.p = e
f.t = i
f.u = l
g.y = m
g.v = m
g.x = k
g.t = i
g.r = i
g.p = e
g.q = e
g.z = l
g.o = h
l.v = e
l.t = e
l.x = k
l.y = n
l.o = d
i.u = f
assert i.u.t.u.t.u.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: I = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: D = None
        self.p: A = None
        self.o: D = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: D = None
        self.t: A = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

e = A("e")
n = B("n")
h = C("h")
k = D("k")
d = E("d")
m = F("m")
f = G("f")
g = H("g")
l = I("l")
i = B("i")

e.r = m
n.u = f
h.w = d
h.z = d
h.t = l
k.t = m
k.p = e
k.z = f
d.t = n
m.t = g
m.u = g
m.v = k
m.o = k
m.p = e
f.t = i
f.u = l
g.y = m
g.v = m
g.x = k
g.t = i
g.r = i
g.p = e
g.q = e
g.z = l
g.o = h
l.v = e
l.t = e
l.x = k
l.y = n
l.o = d
i.u = f
assert i.u.t.u.t.u.u.o.txt == "d"