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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: F = None
        self.x: I = None
        self.q: E = None
        self.u: C = None
        self.z: A = None
        self.v: I = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: H = None
        self.q: H = None
        self.s: E = None
        self.v: B = None
        self.p: D = None
        self.x: A = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: F = None
        self.p: H = None
        self.y: D = None
        self.s: H = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: F = None
        self.x: I = None
        self.q: E = None
        self.u: C = None
        self.z: A = None
        self.v: I = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: H = None
        self.q: H = None
        self.s: E = None
        self.v: B = None
        self.p: D = None
        self.x: A = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: F = None
        self.p: H = None
        self.y: D = None
        self.s: H = None
        self.z: E = None
        self.txt = txt

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

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

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

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