class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: H = None
        self.z: G = None
        self.t: G = None
        self.u: G = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.q: C = None
        self.t: B = None
        self.v: B = None
        self.u: D = None
        self.y: C = None
        self.txt = txt

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

n = A("n")
f = B("f")
c = C("c")
a = D("a")
l = E("l")
b = F("b")
g = G("g")
k = H("k")
i = B("i")
e = D("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: H = None
        self.z: G = None
        self.t: G = None
        self.u: G = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.q: C = None
        self.t: B = None
        self.v: B = None
        self.u: D = None
        self.y: C = None
        self.txt = txt

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

n = A("n")
f = B("f")
c = C("c")
a = D("a")
l = E("l")
b = F("b")
g = G("g")
k = H("k")
i = B("i")
e = D("e")

n.o = e
n.w = g
n.z = c
f.r = e
c.y = k
c.r = l
a.q = c
a.o = k
a.y = k
a.z = g
a.t = g
a.u = g
l.s = b
b.y = n
b.z = n
b.u = k
g.z = i
g.x = l
g.q = c
g.y = c
g.t = f
g.v = f
g.u = e
k.s = l
k.t = f
i.r = a
e.q = c
e.o = k
e.y = k
e.z = g
e.t = g
e.u = g
assert i.r.q.y.s.s.txt == "b"