class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: B = None
        self.r: F = None
        self.s: G = None
        self.y: F = None
        self.q: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.o: G = None
        self.q: I = None
        self.p: G = None
        self.v: I = None
        self.x: B = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.u: H = None
        self.y: C = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: I = None
        self.y: H = None
        self.p: B = None
        self.r: C = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.u: D = None
        self.v: E = None
        self.txt = txt

m = A("m")
n = B("n")
e = C("e")
i = D("i")
l = E("l")
h = F("h")
d = G("d")
b = H("b")
f = I("f")

m.p = f
m.q = f
m.u = n
m.r = h
m.y = h
m.s = d
n.u = l
n.r = l
n.q = l
n.s = m
n.y = i
n.p = e
e.w = h
e.s = i
e.u = i
e.r = i
e.p = b
e.q = m
e.z = d
e.x = n
i.q = d
i.y = b
i.s = h
i.p = h
i.r = n
l.y = b
l.t = b
l.w = f
l.q = f
l.v = f
l.o = d
l.p = d
l.x = n
h.t = i
h.z = e
h.y = e
h.u = b
h.v = n
d.q = n
d.p = n
d.w = f
d.y = b
d.r = e
d.o = h
b.v = d
b.u = i
f.s = l
f.t = l
f.v = l
f.u = i
assert h.v.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: B = None
        self.r: F = None
        self.s: G = None
        self.y: F = None
        self.q: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.o: G = None
        self.q: I = None
        self.p: G = None
        self.v: I = None
        self.x: B = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.u: H = None
        self.y: C = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: I = None
        self.y: H = None
        self.p: B = None
        self.r: C = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.u: D = None
        self.v: E = None
        self.txt = txt

m = A("m")
n = B("n")
e = C("e")
i = D("i")
l = E("l")
h = F("h")
d = G("d")
b = H("b")
f = I("f")

m.p = f
m.q = f
m.u = n
m.r = h
m.y = h
m.s = d
n.u = l
n.r = l
n.q = l
n.s = m
n.y = i
n.p = e
e.w = h
e.s = i
e.u = i
e.r = i
e.p = b
e.q = m
e.z = d
e.x = n
i.q = d
i.y = b
i.s = h
i.p = h
i.r = n
l.y = b
l.t = b
l.w = f
l.q = f
l.v = f
l.o = d
l.p = d
l.x = n
h.t = i
h.z = e
h.y = e
h.u = b
h.v = n
d.q = n
d.p = n
d.w = f
d.y = b
d.r = e
d.o = h
b.v = d
b.u = i
f.s = l
f.t = l
f.v = l
f.u = i
assert h.v.y.r.txt == "n"