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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: F = None
        self.w: C = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: E = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: F = None
        self.w: C = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: E = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

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