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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: B = None
        self.r: F = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.x: C = None
        self.z: A = None
        self.p: A = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: B = None
        self.r: F = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.x: C = None
        self.z: A = None
        self.p: A = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.z: E = None
        self.txt = txt

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

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

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