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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.r: F = None
        self.q: G = None
        self.y: C = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: G = None
        self.r: F = None
        self.q: G = None
        self.y: C = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

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

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