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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: G = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.r: D = None
        self.u: G = None
        self.t: F = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: G = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.r: D = None
        self.u: G = None
        self.t: F = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.txt = txt

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

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

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