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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

j = A("j")
a = B("a")
g = C("g")
l = D("l")
n = E("n")
h = F("h")
i = D("i")
b = D("b")
k = E("k")
f = F("f")

j.u = a
a.p = l
a.z = f
a.r = g
a.v = j
a.y = b
g.x = j
g.p = j
g.v = i
g.o = h
g.w = a
l.w = h
n.t = k
n.p = k
n.w = g
n.x = b
h.v = g
h.s = j
i.w = h
b.w = f
k.t = n
k.p = n
k.w = g
k.x = b
f.v = g
f.s = j
assert g.o.v.o.s.u.p.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

j = A("j")
a = B("a")
g = C("g")
l = D("l")
n = E("n")
h = F("h")
i = D("i")
b = D("b")
k = E("k")
f = F("f")

j.u = a
a.p = l
a.z = f
a.r = g
a.v = j
a.y = b
g.x = j
g.p = j
g.v = i
g.o = h
g.w = a
l.w = h
n.t = k
n.p = k
n.w = g
n.x = b
h.v = g
h.s = j
i.w = h
b.w = f
k.t = n
k.p = n
k.w = g
k.x = b
f.v = g
f.s = j
assert g.o.v.o.s.u.p.w.s.txt == "j"