class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.r: G = None
        self.x: E = None
        self.q: G = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: G = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.u: H = None
        self.q: I = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: I = None
        self.q: C = None
        self.y: B = None
        self.o: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.q: I = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: G = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: H = None
        self.u: H = None
        self.q: I = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: I = None
        self.q: C = None
        self.y: B = None
        self.o: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.q: I = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: I = None
        self.txt = txt

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

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

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

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