class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: B = None
        self.q: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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