class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: G = None
        self.s: I = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.o: B = None
        self.u: A = None
        self.x: G = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.t: E = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: G = None
        self.s: I = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.o: B = None
        self.u: A = None
        self.x: G = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.t: E = None
        self.z: G = None
        self.txt = txt

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

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