class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: F = None
        self.r: C = None
        self.u: G = None
        self.t: C = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: F = None
        self.t: F = None
        self.w: G = None
        self.o: D = None
        self.u: A = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: B = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.o: D = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

m = A("m")
f = B("f")
b = C("b")
i = D("i")
e = E("e")
g = F("g")
j = G("j")
a = D("a")
c = A("c")

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: F = None
        self.t: F = None
        self.w: G = None
        self.o: D = None
        self.u: A = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: B = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.o: D = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

m = A("m")
f = B("f")
b = C("b")
i = D("i")
e = E("e")
g = F("g")
j = G("j")
a = D("a")
c = A("c")

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