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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: F = None
        self.v: E = None
        self.s: E = None
        self.o: F = None
        self.z: H = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: G = None
        self.r: A = None
        self.o: B = None
        self.z: F = None
        self.w: A = None
        self.q: H = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: F = None
        self.v: E = None
        self.s: E = None
        self.o: F = None
        self.z: H = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: G = None
        self.r: A = None
        self.o: B = None
        self.z: F = None
        self.w: A = None
        self.q: H = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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

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

i.u = m
i.t = e
j.s = m
k.r = j
k.w = c
k.o = c
k.v = d
k.s = d
k.z = m
k.u = i
e.y = f
d.v = j
d.o = j
d.u = h
d.r = i
d.w = i
d.z = c
d.q = m
d.s = k
c.o = f
c.t = f
h.q = c
h.s = d
h.z = d
h.p = e
m.o = h
m.z = k
m.r = i
m.q = i
m.t = d
f.r = j
assert h.p.y.r.s.r.t.txt == "e"