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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.p: D = None
        self.t: A = None
        self.o: G = None
        self.u: D = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: A = None
        self.u: B = None
        self.t: B = None
        self.p: B = None
        self.s: D = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.p: D = None
        self.t: A = None
        self.o: G = None
        self.u: D = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: B = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: A = None
        self.u: B = None
        self.t: B = None
        self.p: B = None
        self.s: D = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: E = None
        self.w: G = None
        self.txt = txt

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

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