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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.p: F = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.p: F = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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