class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: B = None
        self.o: F = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: A = None
        self.q: B = None
        self.t: C = None
        self.z: E = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: A = None
        self.q: B = None
        self.t: C = None
        self.z: E = None
        self.v: E = None
        self.o: E = None
        self.txt = txt

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

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