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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.v: G = None
        self.z: B = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: C = None
        self.o: B = None
        self.q: E = None
        self.y: B = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: E = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.v: G = None
        self.z: B = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: C = None
        self.o: B = None
        self.q: E = None
        self.y: B = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: E = None
        self.y: A = None
        self.txt = txt

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

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