class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: C = None
        self.o: B = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: G = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.p: C = None
        self.q: F = None
        self.r: G = None
        self.o: G = None
        self.y: F = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: C = None
        self.z: F = None
        self.u: F = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: G = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: G = None
        self.p: C = None
        self.q: F = None
        self.r: G = None
        self.o: G = None
        self.y: F = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: C = None
        self.z: F = None
        self.u: F = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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