class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: E = None
        self.p: F = None
        self.z: E = None
        self.s: C = None
        self.t: H = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: B = None
        self.r: B = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.y: C = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: B = None
        self.r: B = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.y: C = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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