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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: E = None
        self.s: G = None
        self.t: B = None
        self.x: I = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: I = None
        self.x: F = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: D = None
        self.z: F = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

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

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

h.u = g
h.y = c
h.p = n
h.r = l
h.q = f
h.t = d
k.o = d
k.y = a
k.s = e
k.t = l
k.x = f
k.q = n
d.r = c
d.x = c
n.r = h
n.p = k
n.y = d
a.t = h
g.s = f
g.u = h
e.s = g
e.x = g
e.t = f
e.o = d
e.r = d
c.s = f
c.u = f
c.w = n
c.z = g
c.t = d
f.w = g
f.r = c
l.o = d
l.y = a
l.s = e
l.t = k
l.x = f
l.q = n
assert l.q.r.p.r.p.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: H = None
        self.p: D = None
        self.r: B = None
        self.q: I = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: E = None
        self.s: G = None
        self.t: B = None
        self.x: I = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: I = None
        self.x: F = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: D = None
        self.z: F = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

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

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

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