class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: C = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.txt = txt

i = A("i")
b = B("b")
f = C("f")
k = D("k")
a = E("a")
l = F("l")
d = D("d")

i.p = l
i.v = f
i.o = d
b.t = a
b.r = f
b.u = d
f.w = b
f.o = b
f.p = d
f.r = i
k.q = i
k.y = d
k.x = d
k.t = f
k.w = f
k.o = a
a.q = l
a.x = l
a.o = l
a.p = d
a.t = i
l.o = b
l.v = d
d.q = i
d.y = k
d.x = k
d.t = f
d.w = f
d.o = a
assert b.u.y.t.r.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: C = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.txt = txt

i = A("i")
b = B("b")
f = C("f")
k = D("k")
a = E("a")
l = F("l")
d = D("d")

i.p = l
i.v = f
i.o = d
b.t = a
b.r = f
b.u = d
f.w = b
f.o = b
f.p = d
f.r = i
k.q = i
k.y = d
k.x = d
k.t = f
k.w = f
k.o = a
a.q = l
a.x = l
a.o = l
a.p = d
a.t = i
l.o = b
l.v = d
d.q = i
d.y = k
d.x = k
d.t = f
d.w = f
d.o = a
assert b.u.y.t.r.v.o.txt == "b"