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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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