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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: B = None
        self.y: G = None
        self.s: C = None
        self.r: B = None
        self.o: I = None
        self.q: A = None
        self.w: H = None
        self.u: H = None
        self.txt = txt

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

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

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

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

g = A("g")
e = B("e")
c = C("c")
h = D("h")
n = E("n")
j = F("j")
a = G("a")
m = H("m")
l = I("l")
d = B("d")

g.u = d
e.s = h
e.p = d
e.o = g
c.q = j
h.t = j
h.r = j
h.z = g
h.u = d
h.o = m
h.v = a
h.q = e
n.x = a
n.y = a
n.p = d
n.s = c
n.r = e
n.o = l
n.q = g
n.w = m
n.u = m
j.r = h
j.q = h
j.x = h
j.t = c
j.v = g
j.o = g
j.w = m
j.z = l
a.z = g
a.y = e
a.o = d
a.q = j
a.s = j
a.t = l
m.u = g
m.q = g
m.w = a
m.t = j
m.r = n
m.p = n
m.x = l
m.o = h
m.v = h
l.t = j
l.q = e
l.z = m
d.s = h
d.p = e
d.o = g
assert g.u.o.u.o.u.s.v.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: B = None
        self.y: G = None
        self.s: C = None
        self.r: B = None
        self.o: I = None
        self.q: A = None
        self.w: H = None
        self.u: H = None
        self.txt = txt

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

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

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

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

g = A("g")
e = B("e")
c = C("c")
h = D("h")
n = E("n")
j = F("j")
a = G("a")
m = H("m")
l = I("l")
d = B("d")

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