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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: E = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.t: I = None
        self.u: A = None
        self.v: A = None
        self.s: H = None
        self.x: E = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: I = None
        self.t: I = None
        self.o: D = None
        self.x: C = None
        self.u: B = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: E = None
        self.p: F = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: E = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.t: I = None
        self.u: A = None
        self.v: A = None
        self.s: H = None
        self.x: E = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: I = None
        self.t: I = None
        self.o: D = None
        self.x: C = None
        self.u: B = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: E = None
        self.p: F = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: H = None
        self.txt = txt

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

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