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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.o: H = None
        self.v: A = None
        self.w: F = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: B = None
        self.x: D = None
        self.o: H = None
        self.y: E = None
        self.r: G = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

c = A("c")
f = B("f")
l = C("l")
d = D("d")
k = E("k")
m = F("m")
h = G("h")
n = H("n")
i = E("i")
g = G("g")

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.o: H = None
        self.v: A = None
        self.w: F = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: B = None
        self.x: D = None
        self.o: H = None
        self.y: E = None
        self.r: G = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

c = A("c")
f = B("f")
l = C("l")
d = D("d")
k = E("k")
m = F("m")
h = G("h")
n = H("n")
i = E("i")
g = G("g")

c.u = m
c.v = k
f.t = i
f.z = k
f.o = n
f.v = c
f.w = m
f.r = h
l.v = g
l.x = d
l.p = m
d.t = n
k.o = d
k.v = d
k.u = n
k.q = n
k.p = h
k.z = h
k.y = l
k.r = c
m.q = i
m.u = i
m.o = l
m.p = c
m.r = f
m.w = g
m.t = d
h.w = n
h.o = n
h.v = f
h.x = d
h.z = d
h.y = k
h.r = g
h.q = c
n.q = g
i.o = d
i.v = d
i.u = n
i.q = n
i.p = h
i.z = h
i.y = l
i.r = c
g.w = n
g.o = n
g.v = f
g.x = d
g.z = d
g.y = k
g.r = h
g.q = c
assert n.q.z.t.q.r.r.q.u.u.z.txt == "h"