class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: J = None
        self.s: H = None
        self.v: C = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: I = None
        self.p: J = None
        self.o: I = None
        self.t: I = None
        self.x: H = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: C = None
        self.p: H = None
        self.z: C = None
        self.txt = txt

e = A("e")
f = B("f")
a = C("a")
b = D("b")
j = E("j")
l = F("l")
h = G("h")
k = H("k")
g = I("g")
n = J("n")

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: J = None
        self.s: H = None
        self.v: C = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: I = None
        self.p: J = None
        self.o: I = None
        self.t: I = None
        self.x: H = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: C = None
        self.p: H = None
        self.z: C = None
        self.txt = txt

e = A("e")
f = B("f")
a = C("a")
b = D("b")
j = E("j")
l = F("l")
h = G("h")
k = H("k")
g = I("g")
n = J("n")

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