class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: B = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

j = A("j")
m = B("m")
f = C("f")
i = D("i")
a = E("a")
d = F("d")
e = G("e")
k = E("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: B = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

j = A("j")
m = B("m")
f = C("f")
i = D("i")
a = E("a")
d = F("d")
e = G("e")
k = E("k")

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