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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.s: H = None
        self.y: C = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.y: G = None
        self.t: B = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: B = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: F = None
        self.y: F = None
        self.z: G = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.s: H = None
        self.y: C = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.y: G = None
        self.t: B = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: B = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: F = None
        self.y: F = None
        self.z: G = None
        self.t: A = None
        self.u: C = None
        self.txt = txt

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

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