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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: B = None
        self.t: D = None
        self.u: E = None
        self.q: E = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: B = None
        self.t: D = None
        self.u: E = None
        self.q: E = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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