class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
g = D("g")
c = E("c")
d = F("d")
b = G("b")

n.u = e
n.x = g
l.o = d
l.x = n
l.s = b
e.r = c
g.r = e
g.t = e
g.s = l
g.y = d
g.x = c
g.z = n
c.t = g
c.s = g
c.w = l
c.z = d
c.p = d
d.y = b
d.w = e
d.t = l
b.y = n
b.x = n
b.o = d
assert l.o.w.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
g = D("g")
c = E("c")
d = F("d")
b = G("b")

n.u = e
n.x = g
l.o = d
l.x = n
l.s = b
e.r = c
g.r = e
g.t = e
g.s = l
g.y = d
g.x = c
g.z = n
c.t = g
c.s = g
c.w = l
c.z = d
c.p = d
d.y = b
d.w = e
d.t = l
b.y = n
b.x = n
b.o = d
assert l.o.w.r.s.txt == "g"