class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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