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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: E = None
        self.q: E = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: E = None
        self.q: E = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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