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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: E = None
        self.y: F = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: C = None
        self.x: G = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: B = None
        self.y: B = None
        self.p: A = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: E = None
        self.y: F = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: C = None
        self.x: G = None
        self.r: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: B = None
        self.y: B = None
        self.p: A = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

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

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

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