class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: F = None
        self.p: B = None
        self.s: F = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.x: C = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.x: C = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

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

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