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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.t: C = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.t: C = None
        self.s: F = None
        self.txt = txt

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

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

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