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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.s: E = None
        self.z: C = None
        self.o: C = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.s: E = None
        self.z: C = None
        self.o: C = None
        self.r: D = None
        self.txt = txt

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

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