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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: C = None
        self.z: A = None
        self.t: C = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: F = None
        self.q: E = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.txt = txt

n = A("n")
b = B("b")
a = C("a")
g = D("g")
h = E("h")
e = F("e")
d = G("d")
l = F("l")
j = F("j")
i = C("i")

n.q = d
b.u = j
b.q = i
b.z = n
b.t = a
b.x = d
a.o = b
g.u = h
g.v = h
g.x = n
g.r = n
g.w = a
g.y = j
h.p = g
h.x = d
h.r = n
h.w = b
h.o = i
e.y = g
e.u = j
e.q = h
e.t = a
d.w = i
d.t = l
l.y = g
l.u = e
l.q = h
l.t = a
j.y = g
j.u = e
j.q = h
j.t = a
i.o = b
assert j.u.y.u.p.y.y.v.p.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: C = None
        self.z: A = None
        self.t: C = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: F = None
        self.q: E = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.txt = txt

n = A("n")
b = B("b")
a = C("a")
g = D("g")
h = E("h")
e = F("e")
d = G("d")
l = F("l")
j = F("j")
i = C("i")

n.q = d
b.u = j
b.q = i
b.z = n
b.t = a
b.x = d
a.o = b
g.u = h
g.v = h
g.x = n
g.r = n
g.w = a
g.y = j
h.p = g
h.x = d
h.r = n
h.w = b
h.o = i
e.y = g
e.u = j
e.q = h
e.t = a
d.w = i
d.t = l
l.y = g
l.u = e
l.q = h
l.t = a
j.y = g
j.u = e
j.q = h
j.t = a
i.o = b
assert j.u.y.u.p.y.y.v.p.y.y.txt == "g"