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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: F = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.v: G = None
        self.o: F = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: H = None
        self.o: E = None
        self.u: A = None
        self.q: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.x: D = None
        self.q: A = None
        self.o: A = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: F = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: B = None
        self.v: G = None
        self.o: F = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: H = None
        self.o: E = None
        self.u: A = None
        self.q: B = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.x: D = None
        self.q: A = None
        self.o: A = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

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

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