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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: D = None
        self.r: D = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.u: F = None
        self.s: B = None
        self.y: A = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: D = None
        self.r: D = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.u: F = None
        self.s: B = None
        self.y: A = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

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

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