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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: G = None
        self.z: G = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.p: E = None
        self.x: F = None
        self.t: C = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: B = None
        self.x: E = None
        self.y: G = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: G = None
        self.z: G = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.p: E = None
        self.x: F = None
        self.t: C = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: B = None
        self.x: E = None
        self.y: G = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.o: D = None
        self.txt = txt

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

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