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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: D = None
        self.s: D = None
        self.q: D = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.p: E = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: D = None
        self.s: D = None
        self.q: D = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.p: E = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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