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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: C = None
        self.t: F = None
        self.z: C = None
        self.r: D = None
        self.u: F = None
        self.v: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: A = None
        self.w: E = None
        self.s: F = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.y: D = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: H = None
        self.w: C = None
        self.v: H = None
        self.p: C = None
        self.t: D = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.u: G = None
        self.t: E = None
        self.y: B = None
        self.z: G = None
        self.txt = txt

c = A("c")
g = B("g")
d = C("d")
f = D("f")
i = E("i")
l = F("l")
e = G("e")
b = H("b")
j = G("j")
m = E("m")

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: C = None
        self.t: F = None
        self.z: C = None
        self.r: D = None
        self.u: F = None
        self.v: D = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: A = None
        self.w: E = None
        self.s: F = None
        self.y: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.y: D = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: H = None
        self.w: C = None
        self.v: H = None
        self.p: C = None
        self.t: D = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.u: G = None
        self.t: E = None
        self.y: B = None
        self.z: G = None
        self.txt = txt

c = A("c")
g = B("g")
d = C("d")
f = D("f")
i = E("i")
l = F("l")
e = G("e")
b = H("b")
j = G("j")
m = E("m")

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