class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: I = None
        self.y: I = None
        self.v: I = None
        self.p: F = None
        self.w: G = None
        self.x: I = None
        self.s: I = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.s: I = None
        self.q: B = None
        self.v: G = None
        self.z: A = None
        self.y: B = None
        self.p: I = None
        self.w: C = None
        self.txt = txt

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

a = A("a")
j = B("j")
m = C("m")
l = D("l")
c = E("c")
n = F("n")
e = G("e")
h = H("h")
b = I("b")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.s: I = None
        self.q: B = None
        self.v: G = None
        self.z: A = None
        self.y: B = None
        self.p: I = None
        self.w: C = None
        self.txt = txt

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

a = A("a")
j = B("j")
m = C("m")
l = D("l")
c = E("c")
n = F("n")
e = G("e")
h = H("h")
b = I("b")

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