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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: E = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: G = None
        self.x: H = None
        self.r: E = None
        self.y: D = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.s: B = None
        self.x: F = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: E = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: G = None
        self.x: H = None
        self.r: E = None
        self.y: D = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.s: B = None
        self.x: F = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

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

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

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