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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: D = None
        self.o: A = None
        self.v: F = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.r: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: G = None
        self.o: E = None
        self.u: C = None
        self.q: G = None
        self.txt = txt

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

e = A("e")
f = B("f")
m = C("m")
n = D("n")
a = E("a")
k = F("k")
j = G("j")
h = F("h")
i = D("i")

e.r = f
f.r = h
f.s = n
f.w = n
f.o = e
f.v = k
m.p = k
m.v = k
m.r = h
m.y = f
n.u = a
n.x = h
n.s = j
a.v = f
a.w = m
a.x = e
k.w = a
k.o = a
k.y = j
k.q = j
k.u = m
j.z = k
j.x = a
j.r = m
h.w = a
h.o = a
h.y = j
h.q = j
h.u = m
i.u = a
i.x = k
i.s = j
assert h.u.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: D = None
        self.o: A = None
        self.v: F = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.r: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: G = None
        self.o: E = None
        self.u: C = None
        self.q: G = None
        self.txt = txt

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

e = A("e")
f = B("f")
m = C("m")
n = D("n")
a = E("a")
k = F("k")
j = G("j")
h = F("h")
i = D("i")

e.r = f
f.r = h
f.s = n
f.w = n
f.o = e
f.v = k
m.p = k
m.v = k
m.r = h
m.y = f
n.u = a
n.x = h
n.s = j
a.v = f
a.w = m
a.x = e
k.w = a
k.o = a
k.y = j
k.q = j
k.u = m
j.z = k
j.x = a
j.r = m
h.w = a
h.o = a
h.y = j
h.q = j
h.u = m
i.u = a
i.x = k
i.s = j
assert h.u.p.o.txt == "a"