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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: G = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: G = None
        self.w: I = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: G = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: G = None
        self.w: I = None
        self.r: B = None
        self.txt = txt

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

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

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