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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.x: C = None
        self.q: B = None
        self.s: F = None
        self.v: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.x: C = None
        self.q: B = None
        self.s: F = None
        self.v: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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