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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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