class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: F = None
        self.q: B = None
        self.u: B = None
        self.v: B = None
        self.o: D = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: E = None
        self.r: B = None
        self.w: A = None
        self.txt = txt

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

d = A("d")
g = B("g")
i = C("i")
j = D("j")
c = E("c")
n = F("n")
f = G("f")
k = F("k")
l = F("l")

d.s = j
g.s = k
g.o = f
g.u = f
g.r = l
i.w = c
i.r = l
i.q = g
i.u = g
i.v = g
i.o = j
i.y = j
j.y = f
c.o = n
c.t = j
c.p = j
c.z = f
c.v = g
c.q = g
n.q = c
n.p = c
n.r = g
n.w = d
f.o = j
f.q = i
f.x = g
f.t = d
k.q = c
k.p = c
k.r = g
k.w = d
l.q = c
l.p = c
l.r = g
l.w = d
assert c.z.t.s.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: F = None
        self.q: B = None
        self.u: B = None
        self.v: B = None
        self.o: D = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: E = None
        self.r: B = None
        self.w: A = None
        self.txt = txt

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

d = A("d")
g = B("g")
i = C("i")
j = D("j")
c = E("c")
n = F("n")
f = G("f")
k = F("k")
l = F("l")

d.s = j
g.s = k
g.o = f
g.u = f
g.r = l
i.w = c
i.r = l
i.q = g
i.u = g
i.v = g
i.o = j
i.y = j
j.y = f
c.o = n
c.t = j
c.p = j
c.z = f
c.v = g
c.q = g
n.q = c
n.p = c
n.r = g
n.w = d
f.o = j
f.q = i
f.x = g
f.t = d
k.q = c
k.p = c
k.r = g
k.w = d
l.q = c
l.p = c
l.r = g
l.w = d
assert c.z.t.s.y.q.txt == "i"