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

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

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

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

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

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

j = A("j")
i = B("i")
c = C("c")
m = D("m")
b = E("b")
n = F("n")

j.u = i
j.s = i
j.r = n
i.q = b
c.v = b
c.s = b
c.x = b
c.w = i
c.p = i
c.u = m
m.t = n
m.u = n
m.s = n
m.r = i
m.q = i
m.o = j
b.r = j
b.v = j
b.y = j
b.w = j
b.x = c
b.p = n
n.o = i
n.u = m
assert m.o.s.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: B = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

j = A("j")
i = B("i")
c = C("c")
m = D("m")
b = E("b")
n = F("n")

j.u = i
j.s = i
j.r = n
i.q = b
c.v = b
c.s = b
c.x = b
c.w = i
c.p = i
c.u = m
m.t = n
m.u = n
m.s = n
m.r = i
m.q = i
m.o = j
b.r = j
b.v = j
b.y = j
b.w = j
b.x = c
b.p = n
n.o = i
n.u = m
assert m.o.s.q.v.txt == "j"