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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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