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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.z: F = None
        self.w: G = None
        self.y: E = None
        self.t: F = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: F = None
        self.t: F = None
        self.txt = txt

b = A("b")
m = B("m")
a = C("a")
l = D("l")
g = E("g")
d = F("d")
j = G("j")
e = E("e")
k = E("k")
f = C("f")

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: E = None
        self.z: F = None
        self.w: G = None
        self.y: E = None
        self.t: F = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: F = None
        self.t: F = None
        self.txt = txt

b = A("b")
m = B("m")
a = C("a")
l = D("l")
g = E("g")
d = F("d")
j = G("j")
e = E("e")
k = E("k")
f = C("f")

b.p = d
b.t = d
b.v = f
b.x = j
b.y = m
m.o = l
a.s = m
a.o = e
a.y = e
a.z = d
a.t = d
a.w = j
a.v = j
l.o = b
l.v = b
g.v = k
g.t = d
d.p = f
d.y = f
d.o = g
d.s = e
j.x = f
j.u = d
j.t = d
e.v = k
e.t = d
k.v = g
k.t = d
f.s = m
f.o = g
f.y = g
f.z = d
f.t = d
f.w = j
f.v = j
assert g.v.v.t.txt == "d"