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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: C = None
        self.t: B = None
        self.z: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: F = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: C = None
        self.t: B = None
        self.z: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: F = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

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

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