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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: D = None
        self.q: E = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: C = None
        self.s: C = None
        self.u: H = None
        self.t: G = None
        self.o: A = None
        self.p: C = None
        self.v: G = None
        self.z: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: G = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: I = None
        self.q: F = None
        self.txt = txt

i = A("i")
f = B("f")
g = C("g")
h = D("h")
k = E("k")
b = F("b")
d = G("d")
e = H("e")
j = I("j")
a = J("a")

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: D = None
        self.q: E = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: C = None
        self.s: C = None
        self.u: H = None
        self.t: G = None
        self.o: A = None
        self.p: C = None
        self.v: G = None
        self.z: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: G = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: I = None
        self.q: F = None
        self.txt = txt

i = A("i")
f = B("f")
g = C("g")
h = D("h")
k = E("k")
b = F("b")
d = G("d")
e = H("e")
j = I("j")
a = J("a")

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