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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: A = None
        self.u: I = None
        self.v: D = None
        self.o: B = None
        self.p: G = None
        self.w: B = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: E = None
        self.w: E = None
        self.y: H = None
        self.p: B = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: A = None
        self.u: I = None
        self.v: D = None
        self.o: B = None
        self.p: G = None
        self.w: B = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: E = None
        self.w: E = None
        self.y: H = None
        self.p: B = None
        self.r: B = None
        self.txt = txt

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

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