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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: G = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

l = A("l")
m = B("m")
g = C("g")
n = D("n")
h = E("h")
e = F("e")
d = G("d")
f = F("f")
k = F("k")

l.u = f
l.t = m
l.q = n
m.x = f
m.y = h
m.v = h
m.p = g
m.t = l
m.r = d
g.v = l
n.p = g
n.q = d
n.r = l
h.x = d
e.y = g
e.z = m
e.w = k
e.s = f
e.x = h
d.q = h
d.x = g
f.y = g
f.z = m
f.w = k
f.s = e
f.x = h
k.y = g
k.z = m
k.w = f
k.s = e
k.x = h
assert d.x.v.u.s.s.w.w.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: G = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

l = A("l")
m = B("m")
g = C("g")
n = D("n")
h = E("h")
e = F("e")
d = G("d")
f = F("f")
k = F("k")

l.u = f
l.t = m
l.q = n
m.x = f
m.y = h
m.v = h
m.p = g
m.t = l
m.r = d
g.v = l
n.p = g
n.q = d
n.r = l
h.x = d
e.y = g
e.z = m
e.w = k
e.s = f
e.x = h
d.q = h
d.x = g
f.y = g
f.z = m
f.w = k
f.s = e
f.x = h
k.y = g
k.z = m
k.w = f
k.s = e
k.x = h
assert d.x.v.u.s.s.w.w.z.t.txt == "l"