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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: E = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: D = None
        self.v: A = None
        self.y: D = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: G = None
        self.r: I = None
        self.p: B = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: H = None
        self.v: F = None
        self.s: E = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.u: I = None
        self.p: E = None
        self.q: A = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.v: B = None
        self.t: B = None
        self.w: E = None
        self.u: D = None
        self.p: D = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: E = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: D = None
        self.v: A = None
        self.y: D = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: G = None
        self.r: I = None
        self.p: B = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: H = None
        self.v: F = None
        self.s: E = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.u: I = None
        self.p: E = None
        self.q: A = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.v: B = None
        self.t: B = None
        self.w: E = None
        self.u: D = None
        self.p: D = None
        self.s: F = None
        self.txt = txt

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

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