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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: D = None
        self.s: F = None
        self.v: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.q: E = None
        self.o: E = None
        self.y: G = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

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

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

c.w = j
c.v = j
c.x = j
c.q = d
c.r = m
c.y = g
k.z = c
k.o = g
k.s = h
k.v = m
d.p = m
d.o = c
g.v = b
g.y = m
g.u = m
g.q = j
g.z = c
g.x = c
j.u = h
j.p = d
j.s = k
j.t = m
j.o = m
h.z = m
h.y = m
h.w = g
h.p = g
h.u = g
h.q = j
h.o = j
m.q = c
m.p = c
m.v = j
m.x = j
m.o = g
b.z = c
b.o = g
b.s = h
b.v = m
assert j.p.p.o.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.q: C = None
        self.x: E = None
        self.r: G = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: D = None
        self.s: F = None
        self.v: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.q: E = None
        self.o: E = None
        self.y: G = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

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

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

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