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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.q: C = None
        self.v: B = None
        self.r: D = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.q: C = None
        self.v: B = None
        self.r: D = None
        self.p: D = None
        self.txt = txt

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

j.u = l
g.t = m
i.x = l
i.w = l
i.z = h
i.t = n
i.q = b
i.r = j
h.v = g
e.w = n
e.z = b
e.x = b
l.z = h
l.r = h
l.o = n
l.q = i
l.v = m
l.p = c
m.t = g
c.v = m
b.w = n
b.z = e
b.x = e
n.x = l
n.w = l
n.z = c
n.t = i
n.q = e
n.r = j
assert b.x.w.r.txt == "j"