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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.w: C = None
        self.o: D = None
        self.r: E = None
        self.p: C = None
        self.y: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.p: B = None
        self.t: H = None
        self.r: H = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: E = None
        self.w: C = None
        self.o: D = None
        self.r: E = None
        self.p: C = None
        self.y: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.p: B = None
        self.t: H = None
        self.r: H = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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