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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: G = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.w: D = None
        self.s: G = None
        self.txt = txt

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

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

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

h.q = e
h.y = b
h.z = l
h.o = g
h.t = n
h.r = k
n.w = k
n.q = k
n.r = e
k.x = n
c.o = l
b.r = l
b.x = f
b.w = c
b.s = e
l.w = d
e.s = l
g.o = l
d.r = l
d.x = f
d.w = c
d.s = e
f.q = e
f.y = b
f.z = l
f.o = c
f.t = n
f.r = k
assert b.w.o.w.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: E = None
        self.z: F = None
        self.o: D = None
        self.t: B = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: G = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.w: D = None
        self.s: G = None
        self.txt = txt

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

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

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

h.q = e
h.y = b
h.z = l
h.o = g
h.t = n
h.r = k
n.w = k
n.q = k
n.r = e
k.x = n
c.o = l
b.r = l
b.x = f
b.w = c
b.s = e
l.w = d
e.s = l
g.o = l
d.r = l
d.x = f
d.w = c
d.s = e
f.q = e
f.y = b
f.z = l
f.o = c
f.t = n
f.r = k
assert b.w.o.w.x.t.txt == "n"