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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: D = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: D = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

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

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