class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: E = None
        self.r: C = None
        self.x: D = None
        self.y: C = None
        self.p: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.z: F = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: E = None
        self.o: C = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

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

g = A("g")
h = B("h")
d = C("d")
a = D("a")
c = E("c")
j = F("j")
m = G("m")
e = D("e")
l = B("l")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.z: F = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: E = None
        self.o: C = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

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

g = A("g")
h = B("h")
d = C("d")
a = D("a")
c = E("c")
j = F("j")
m = G("m")
e = D("e")
l = B("l")

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