class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: B = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: F = None
        self.u: A = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.w: A = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: C = None
        self.z: C = None
        self.v: E = None
        self.y: D = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: E = None
        self.r: C = None
        self.x: F = None
        self.txt = txt

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

e.r = d
e.x = i
e.z = j
e.t = j
i.o = e
i.p = f
l.z = b
j.q = e
j.t = b
f.t = b
f.r = n
f.u = e
f.p = m
n.p = l
n.x = d
n.w = e
n.q = j
n.y = i
b.q = n
b.t = l
b.z = l
b.v = f
b.y = j
b.u = i
d.r = e
d.t = j
d.y = l
d.w = n
m.s = j
m.q = f
m.r = l
m.x = n
assert l.z.y.t.t.z.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: B = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: F = None
        self.u: A = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.w: A = None
        self.q: D = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: C = None
        self.z: C = None
        self.v: E = None
        self.y: D = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: E = None
        self.r: C = None
        self.x: F = None
        self.txt = txt

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

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