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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: E = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: A = None
        self.z: F = None
        self.o: F = None
        self.txt = txt

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

c = A("c")
j = B("j")
k = C("k")
l = D("l")
g = E("g")
f = F("f")

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: E = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: A = None
        self.z: F = None
        self.o: F = None
        self.txt = txt

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

c = A("c")
j = B("j")
k = C("k")
l = D("l")
g = E("g")
f = F("f")

c.w = k
c.v = l
c.t = l
c.s = l
c.x = f
j.s = l
j.u = l
j.y = g
j.t = f
k.q = g
k.z = f
k.u = j
l.q = c
l.x = c
l.y = j
l.p = g
g.w = j
g.q = c
g.z = f
g.o = f
f.u = j
f.s = j
f.w = l
f.t = l
f.q = g
f.z = c
assert f.w.q.x.z.v.txt == "l"