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

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: D = None
        self.s: F = None
        self.z: H = None
        self.t: F = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.t: G = None
        self.v: G = None
        self.w: C = None
        self.r: E = None
        self.txt = txt

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

h.r = i
h.y = i
h.s = b
h.v = b
h.u = j
h.w = j
h.p = e
h.t = e
h.q = e
c.y = g
c.z = h
c.s = e
c.t = e
j.y = g
j.x = e
e.p = n
e.o = h
i.q = j
i.r = b
i.u = m
g.x = h
g.y = b
g.r = n
g.t = n
g.z = e
g.w = j
g.v = c
b.r = j
b.o = j
b.u = j
b.x = e
b.s = g
b.t = g
b.z = m
m.w = g
m.t = i
m.v = j
n.u = j
n.w = j
n.y = b
n.t = b
n.v = b
n.r = i
assert m.v.y.x.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: G = None
        self.u: C = None
        self.v: G = None
        self.w: C = None
        self.y: E = None
        self.p: D = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: D = None
        self.s: F = None
        self.z: H = None
        self.t: F = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.t: G = None
        self.v: G = None
        self.w: C = None
        self.r: E = None
        self.txt = txt

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

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