class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.w: C = None
        self.q: C = None
        self.y: G = None
        self.v: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.x: C = None
        self.z: E = None
        self.o: E = None
        self.s: A = None
        self.txt = txt

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

k = A("k")
g = B("g")
f = C("f")
b = D("b")
i = E("i")
m = F("m")
a = G("a")
l = C("l")
d = A("d")

k.o = m
k.p = a
k.y = a
k.w = l
k.q = f
k.v = d
g.x = d
g.w = m
g.v = m
f.x = i
f.p = l
b.q = l
b.u = f
b.p = a
i.y = a
i.o = b
m.r = g
m.p = g
m.x = f
m.z = i
m.o = i
m.s = k
a.w = m
l.x = i
l.p = f
d.o = m
d.p = a
d.y = a
d.w = l
d.q = l
d.v = k
assert m.r.v.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.w: C = None
        self.q: C = None
        self.y: G = None
        self.v: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.x: C = None
        self.z: E = None
        self.o: E = None
        self.s: A = None
        self.txt = txt

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

k = A("k")
g = B("g")
f = C("f")
b = D("b")
i = E("i")
m = F("m")
a = G("a")
l = C("l")
d = A("d")

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