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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: D = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: E = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: H = None
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: D = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: E = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: H = None
        self.y: H = None
        self.txt = txt

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

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