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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: A = None
        self.q: C = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.t: A = None
        self.p: D = None
        self.x: D = None
        self.o: H = None
        self.w: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: A = None
        self.q: C = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.t: A = None
        self.p: D = None
        self.x: D = None
        self.o: H = None
        self.w: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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