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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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