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

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

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

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

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

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

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

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

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

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

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

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

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

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

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