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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: A = None
        self.u: G = None
        self.z: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: G = None
        self.w: C = None
        self.s: G = None
        self.u: B = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.txt = txt

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

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

g = A("g")
a = B("a")
k = C("k")
j = D("j")
i = E("i")
f = F("f")
l = G("l")
m = D("m")
d = F("d")
h = A("h")

g.s = h
g.t = l
g.x = a
g.p = f
g.u = d
g.o = k
a.p = g
k.o = i
k.z = i
k.s = g
k.y = g
k.u = l
j.x = k
j.w = k
j.r = l
j.s = l
j.u = a
j.z = g
i.z = l
i.x = j
f.t = l
f.u = d
f.s = i
l.z = i
l.u = j
l.x = a
m.x = k
m.w = k
m.r = l
m.s = l
m.u = a
m.z = g
d.t = l
d.u = f
d.s = i
h.s = g
h.t = l
h.x = a
h.p = d
h.u = f
h.o = k
assert d.t.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.x: B = None
        self.p: F = None
        self.u: F = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: A = None
        self.u: G = None
        self.z: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: G = None
        self.w: C = None
        self.s: G = None
        self.u: B = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.txt = txt

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

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

g = A("g")
a = B("a")
k = C("k")
j = D("j")
i = E("i")
f = F("f")
l = G("l")
m = D("m")
d = F("d")
h = A("h")

g.s = h
g.t = l
g.x = a
g.p = f
g.u = d
g.o = k
a.p = g
k.o = i
k.z = i
k.s = g
k.y = g
k.u = l
j.x = k
j.w = k
j.r = l
j.s = l
j.u = a
j.z = g
i.z = l
i.x = j
f.t = l
f.u = d
f.s = i
l.z = i
l.u = j
l.x = a
m.x = k
m.w = k
m.r = l
m.s = l
m.u = a
m.z = g
d.t = l
d.u = f
d.s = i
h.s = g
h.t = l
h.x = a
h.p = d
h.u = f
h.o = k
assert d.t.x.p.txt == "g"